﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LibraryO2S;
using System.IO;

public partial class Administrator_locationadd : System.Web.UI.Page
{
    private LocationController objLocation = new LocationController();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string name = txtName.Text;
        string desc = txtDescription.Text;
        string price = txtPrice.Text.Trim();
        string status = "";
        if (chkStatus.Checked == true)
        {
            status = "1";
        }
        else
        {
            status = "0";
        }
        int a = objLocation.Insert(name, desc, price, status);
        if (a > 0)
        {
            Response.Redirect("location.aspx");
        }
    }
}